<% content_for :javascript_link_tags do %>
<%= javascript_include_tag ['/assets/moment.min.js',
                            '/assets/admin/models/dcmgr.js',
                            '/assets/admin/collections/detail_collection.js',
                            '/assets/admin/views/detail_view.js',
                            '/assets/admin/controllers/host_nodes/detail_controller.js',
			    '/assets/admin/helpers.js',
] %>
<% end %>

<% content_for :stylesheet_link_tags do %>
<% end %>

    <div class="span9">
      <div id="content"></div>
      <div id="statistics"></div>
      <script type="text/template" id="detailHostNode">
      <div class="controls">
        <ul class="breadcrumb">
          <li><a href="/">ホーム</a> <span class="divider">/</span></li>
          <li><a href="/host_nodes">ホストノード</a> <span class="divider">/</span></li>
          <li class="active">ID: {{ uuid }}</li>
        </ul>
      </div><!-- controls -->

      <form class="form-detail form-horizontal form-horizontal-fix">
      <div class="control-group">
        <legend>ホストノード詳細</legend>
      </div>
      <div class="control-group">
        <label class="control-label">ホストノードID:</label>
        <div class="controls">
          <p>{{ uuid }}</p>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">ホストノード名:</label>
        <div class="controls">
          <p>{% if(! _.isNull(display_name)){ %}{{ display_name }}{% } %}</p>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">ハイパーバイザ:</label>
        <div class="controls">
          <p>{{ hypervisor }}</p>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">CPUコア数:</label>
        <div class="controls">
          <p>{{ offering_cpu_cores }}</p>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">メモリーサイズ:</label>
        <div class="controls">
          <p>{{ offering_memory_size }}MB</p>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">状態:</label>
        <div class="controls">
          <p>{{ status }}</p>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">作成日時:</label>
        <div class="controls">
          <p>{{ app.helpers.date_ja.parse(created_at) }}</p>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">更新日時:</label>
        <div class="controls">
          <p>{{ app.helpers.date_ja.parse(updated_at) }}</p>
        </div>
      </div>
     </form>
     </script>
     <script type="text/template" id="detailStatistics">
      <form class="form-horizontal form-horizontal-fix">
        <div class="control-group">
          <legend>統計情報</legend>
        </div>
        <div class="control-group">
          <label class="control-label">インスタンス総数:</label>
          <div class="controls">
            <p>{{ this.collection.instanceTotal(accounts) }}</p>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">アカウント総数:</label>
           <div class="controls">
            <p>{{ this.collection.accountTotal(accounts) }}</p>
          </div>
         </div>
      </form>
      <div class="control-group" style="padding-left:28px">
        <label class="control-label"><b>アカウント／インスタンス数</b></label>
        <div class="controls" style="padding-left:30px">
          <p>
	  {% _.each(accounts, function(value, key) { %}
          {{ key }} / {{ value.length }} <br />
	  {% }) %}
          </p>
         </div>
       </div>
       </script>
</div><!-- span -->
